home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Frameworks / Grant's CGI Framework 1.0b12 / Util / globals.h < prev    next >
C/C++ Source or Header  |  1995-12-09  |  2KB  |  98 lines

  1. #pragma once
  2. /*****
  3.  *
  4.  *    globals.h
  5.  *
  6.  *    This is a support file for "Grant's CGI Framework".
  7.  *    Please see the license agreement that accompanies the distribution package
  8.  *    for licensing details.
  9.  *
  10.  *    Copyright ©1995 by Grant Neufeld
  11.  *    grant@acm.com
  12.  *    http://arpp1.carleton.ca/grant/
  13.  *
  14.  *****/
  15.  
  16. #include "MyConfiguration.h"
  17.  
  18. #include <Threads.h>
  19.  
  20.  
  21. /***  GLOBAL DECLARATIONS  ***/
  22.  
  23. #ifdef __MainSegment__
  24.     #define    _GLOBAL_    /* local */
  25. #else
  26.     #define    _GLOBAL_    extern
  27. #endif
  28.  
  29. /** MEMORY **/
  30.  
  31. /* handle to emergency memory reserve. Used in MemoryFunc.c. IM-Memory 1-46 */
  32. _GLOBAL_    Handle        gEmergencyMemory;
  33.  
  34.  
  35. /** PROCESS **/
  36.  
  37. _GLOBAL_    Boolean        gQuit;            /* application is set to quit */
  38. _GLOBAL_    Boolean        gFrontProcess;    /* application is in the foreground */
  39. _GLOBAL_    long        gSleepTicks;    /* sleep time for WaitNextEvent | threads */
  40. #if kCompileWithProcessFileSpec
  41. _GLOBAL_    FSSpec        gProcessFSSpec;    /* the FSSpec for the application */
  42. #endif
  43.  
  44. _GLOBAL_    ThreadID    gThreadMain;    /* main application thread id */
  45. _GLOBAL_    short        gThreadTotal;    /* # of threads other than main */
  46.  
  47. #if kCompileWithQuitOnLongIdle
  48. _GLOBAL_    long        gTimeLastAction;/* the time in ticks of the last action performed */
  49. _GLOBAL_    Boolean        gDoIdleQuit;    /* whether to quit after period of inactivity */
  50. _GLOBAL_    long        gIdleTimeToQuit;/* idle time needed until quit set */
  51. _GLOBAL_    Boolean        gDoIdleQuitOnOpenApp; /* quit on idle after open app */
  52. #endif
  53.  
  54. /**  APPLE EVENTS  **/
  55.  
  56. _GLOBAL_    AEIdleUPP    gAEIdleUPP;
  57.  
  58.  
  59. /* SCREEN RECTS */
  60.  
  61. _GLOBAL_    Rect        gScreenRect;    /* main monitor */
  62. _GLOBAL_    Rect        gGrayRgnRect;    /* entire screen */
  63.  
  64.  
  65. /* STRINGS */
  66.  
  67. _GLOBAL_    Str255        gVersionStr;
  68.  
  69.  
  70. /* ERRORS */
  71.  
  72. _GLOBAL_    StringHandle    gSystemErrorStr;
  73.  
  74.  
  75. /* TOOLBOX MANAGERS AND FUNCTION CALLS AVAILABLE */
  76.  
  77. #if kCompileWithDragNDrop
  78. _GLOBAL_    Boolean        gHasDragNDrop;    /* Drag Manager present */
  79. #endif
  80. #if kCompileWithThreadsOptional
  81. _GLOBAL_    Boolean        gHasThreadMgr;    /* Thread Manager present */
  82. #endif
  83. _GLOBAL_    Boolean        gHasColorQD;    /* Color QuickDraw present */
  84.  
  85. /* PROFILER (CodeWarrior) */
  86.  
  87. #if __profile__ && __MWERKS__
  88. _GLOBAL_    Boolean        gProfileOn;
  89. #endif
  90.  
  91.  
  92.  
  93. #ifdef _GLOBAL_
  94.     #undef _GLOBAL_
  95. #endif
  96.  
  97. /***** EOF *****/
  98.